<?php
declare(strict_types=1);
/**
 * Created by PhpStorm.
 * User: wumengmeng <wu_mengmeng@foxmail.com>
 * Date: 2019/4/26 0026
 * Time: 11:18
 */

namespace Modules\SmallApi\Service;

use HiCommon\Repository\LogRepository;

class LogService
{

    /**
     * 记录验证码发送日志
     *
     * @param array $arr_input
     *
     * @return mixed
     * @author wumengmeng <wu_mengmeng@foxmail.com>
     */
    public function record_phone_code(array $arr_input)
    {
        $arr_input = hi_array_del_null($arr_input);
        try {
            //添加
            $res = LogRepository::record_phone_code($arr_input)->toarray();
            if(empty($res)){
                return hello_error('添加失败');
            }

            return  hello_success('成功',$res);
        } catch (\Exception $exception) {
            return hello_error('失败',[],$exception->getMessage());
        }
    }



}